<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/resource/css/admin/main.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/right.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/resource/js/jquery.js"></script>
<script type="text/javascript" src="/resource/js/base.js"></script>
</head>
<body>
    <div class="position"><span>您的当前位置：</span>大众留言 > 留言管理</div>
	<form method="post" action="./">
		<div class="rightbody f">
			<div class="rightbodycontent">
				<table class="tools">
		        	<tr>
		        	    <td>
		        	        审核状态：
		        	        <select name="state" onchange="getform(this).submit()">
		        	            <option value="-1">--全部--</option>
		        	            <option value="0"<#if state == 0> selected</#if>>未审核</option>
		        	            <option value="1"<#if state == 1> selected</#if>>已审核</option>
		        	        </select>
		        	        &nbsp;
		                   	 关键字：<input type="text" name="keywords" value="${keywords!}" style="width:200px" />&nbsp;<a onclick="getform(this).submit()" class="linkbtn search">搜索</a>
		        	    </td>
		                <td align="right">
		                    <a onclick="submitselectdata('delete?leavemessageids','删除','${urlEncode(callbackparams)}')" class="linkbtn delete">删除所选数据</a>
		                </td>
		            </tr>
		        </table>
		        <table cellspacing="1" cellpadding="4" class="tablelist">
		            <tr>
		                <th><input type="checkbox" onclick="selectallcheckbox(this)" /></th>
		                <th>留言者</th>
		                <th width="40%">留言内容</th>
		                <th>留言时间</th>
		                <th>状态</th>
		                <th>操作</th>
		            </tr>
		            <#list leavemessages as leavemessage>
		                 <tr<#if leavemessage_index % 2 == 1> class="splittr"</#if>>
		                    <td align="center"><input type="checkbox" name="ids" value="${leavemessage.id}" /></td>
		                    <td align="center">${leavemessage.username?html}</td>
		                    <td align="center">${substring(leavemessage.contents,30)?html}</td>
		                    <td align="center">${leavemessage.subtime?string('yyyy-MM-dd HH:mm:ss')}</td>
		                    <td align="center">
		                        <#if !leavemessage.checked><span style="color:red">未审核</span>
		                        <#else><span style="color:green">已审核</span>
		                        </#if>
		                    </td>
		                    <td align="center">
		                        <a href="detail?leavemessageid=${leavemessage.id}&callbackparams=${urlEncode(callbackparams)}" class="linkbtn detail noborder">查看详细</a>
		                        <#if !leavemessage.checked>
		                            <a href="checkpass?leavemessageid=${leavemessage.id}&callbackparams=${urlEncode(callbackparams)}" class="linkbtn pass noborder" onclick="return confirm('确定审核通过吗？')">审核通过</a>
		                        </#if>
		                        <a href="delete?leavemessageids=${leavemessage.id}&callbackparams=${urlEncode(callbackparams)}" class="linkbtn delete noborder" onclick="return confirm('确定删除吗？')">删除</a>
		                    </td>
		                </tr>
		            </#list>
		        </table>
		        <br />
				<#include "../../include/pager.html">
			</div>
		</div>
	</form>
</body>
</html>